<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "mops_coupon".
 *
 * @property int $id
 * @property string $code 优惠券号
 * @property int $status 状态
 * @property int $catalog 分类
 * @property int $created_at 创建时间
 * @property int $updated_at 创建时间
 * @property int $expire_at
 */
class Coupon extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'mops_coupon';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['status', 'catalog', 'created_at', 'updated_at', 'expire_at'], 'integer'],
            [['code'], 'string', 'max' => 30],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'code' => 'Code',
            'status' => 'Status',
            'catalog' => 'Catalog',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'expire_at' => 'Expire At',
        ];
    }
}
